﻿import QtQuick 2.12

Rectangle {
    property alias textItem : displayTextId
    border.width: 1
    border.color: "black"
    Rectangle{
        width: displayTextId.contentWidth + 10
        height: displayTextId.contentHeight + 5
        //文本背景和线框的背景一样
        color: "white"
        radius: width / 2
        x: 10
        y:  -height / 2
        Text {
            id: displayTextId
            anchors.centerIn: parent
            font.pixelSize: 20
            font.bold: true
            text: qsTr("测试文本")
        }
    }
}
